<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">    <link rel="stylesheet" href="${s.base}/pc/css/index.css">
    <style>
        html {
            font-size: 62.5%
        }
    </style>
</head>

<body>
    <div class="head">
        <img src="${webConfig.logo}" alt="">
        <span class="click_one" onclick="window.location.href='/'" data-type="shouye">首页</span>
        <#list navigationList as navigation>
            <#if navigation.type=="2">
                <span class="click_one <#if menuId ==navigation.id>click_active</#if>" onclick="window.location.href='${navigation.url}?menuId=${navigation.id}'" data-type="ysyfw">${navigation.name}</span>
            </#if>
        </#list>
        <select onchange="getSelect()" name="" id="select_lo">
            <option value="1">繁体</option>
            <option value="2">简体</option>
        </select>
    </div>
    <div class="banner">
        <div class="swiper-container" data-space-between='10' data-pagination='.swiper-pagination' data-autoplay="1000">
        <div class="swiper-wrapper">
            <#list bannerList as banner>
                <div class="swiper-slide">
                    <a href="${banner.url!'javascript:void(0)'}"><img src="${banner.image}"/></a>
                </div>
            </#list>
        </div>
        </div>
    </div>
    <div id="lxwm">
        <div class="fuwu_nerw">
            <h3 class="he_ba">contact us</h3>
            <h3>聯繫我們</h3>
        </div>
        <div class="portn">
            <div class="lx_conut">
                <div>
                    <p>电话;${webConfig.workPhone}</p>
                    <p>QQ:${webConfig.qq}</p>
                    <p>邮箱：${webConfig.eamil}</p>
                    <p>地址：${webConfig.address}</p>
                </div>
                <img src="${s.base}/pc/images/12.png" alt="">
            </div>
        </div>
        <div style="display: flex;justify-content: center;">
            <div style="width: 43rem;">
                <div class="input_text">
                    <input class="weui-input" type="text" id="title" placeholder="留言标题">
                    <input class="weui-input" type="text" id="email" placeholder="留言邮箱">
                </div>
                <div class="weui-cells weui-cells_form">
                    <div>
                        <div class="weui-cell__bd">
                            <textarea class="weui-textarea" id="content" placeholder="留言内容" rows="3"></textarea>
                        </div>
                    </div>
                </div>
                <div class="input_text">
                    <input class="weui-input" type="text" id="yzm" style="width: 62% !important;height: 32px;" placeholder="验证码">
                    <div id="yzmContent"> </div>
                </div>
                <div class="foot_p">
                    <button type="button" id="submitBtn" >提交</button>
                </div>
            </div>

        </div>
    </div>
    <div id="footer">
        <div>
            <img src="${s.base}/pc/images/11.png" alt="">
            <p>电话：${webConfig.workPhone}</p>
        </div>
        <div>
            <img src="${s.base}/pc/images/10.png" alt="">
            <p>邮箱：${webConfig.eamil}</p>
        </div>
        <div>
            <img src="${s.base}/pc/images/9.png" alt="">
            <p>地址：${webConfig.address}</p>
        </div>
    </div>
</body>

</html>
<!-- body 最后 -->
<script src="${s.base}/mobile/js/jquery.min.js"></script>
<script src="${s.base}/mobile/js/jquery-weui.min.js"></script>
<!-- 如果使用了某些拓展插件还需要额外的JS -->
<script src="${s.base}/mobile/js/swiper.min.js"></script>
<script src="${s.base}/mobile/js/city-picker.min.js"></script>
<script src="${s.base}/pc/js/transition.js"></script>
<script  type="application/javascript" src="${s.base}/js/base/gVerify.js"></script>
<script>
    function getSelect(){
        var val_e = $("#select_lo").val()
        if(val_e == 1){
            zh_tran('t')
        }
        if(val_e == 2){
            zh_tran('s')
        }
    }

    $(".swiper-container").swiper();
    var verifyCode = new GVerify("yzmContent");//初始化验证码
    $("#submitBtn").on("click",function(){
        var yzm = $("#yzm").val();

        var title = $("#title").val();
        if(title == null || title == "") {
            $.toast("请输入留言标题", "text");
            return false;
        }

        var email = $("#email").val();
        if(email == null || email == "") {
            $.toast("请输入留言邮箱", "text");
            return false;
        }
        var content = $("#content").val();
        if(content == null || content == "") {
            $.toast("请输入留言内容", "text");
            return false;
        }
        if(yzm == null || yzm == "") {
            $.toast("请输入验证码", "text");
            return false;
        }
        var res = verifyCode.validate(yzm);
        if(!res){
            $.toast("验证码输入错误！", "text");
            return false;
        }
        var param = {title:title,email:email,content:content};
        $.showLoading("正在提交中");
        $.post("/phone/webMessage",param,function(result){
            if(1==result.returnInfo.state){
                $.hideLoading();
                $.alert("您已提交成功，我们会尽快处理！", function() {
                    //点击确认后的回调函数
                    window.location.reload();
                });

            }else{
                $.hideLoading();
                $.toast("提交失败", "text");
            }
        },"json");
    });


</script>